package com.hetang.maijiayun.adaptertools.b2cinterface.dangdang.request;

public class DdGetOrderRequest extends DdRequest {

	private static final long serialVersionUID = 1L;
	public static int CREATE_TIME = 1;
	public static int MODIFY_TIME = 2;

	private int type;
	
	public DdGetOrderRequest(int type) {
		super("dangdang.orders.list.get");
		this.type = type;
	}
	public void setOrderState(String state){
		this.put("os",state);
	}
	
	public void setPageSize(int pageSize) {
		this.put("pageSize", Integer.toString(pageSize));
	}
	
	public void setPageNo(int pageNo) {
		this.put("p", Integer.toString(pageNo));
	}
	
	public void setStartPoint(String startPoint) {
		if(type == CREATE_TIME)
			this.put("osd", startPoint);
		else
			this.put("lastModifyTime_start", startPoint);
		
	}
	
	public void setEndPoint(String endPoint) {
		if(type == CREATE_TIME)
			this.put("oed", endPoint);
		else
			this.put("lastModifyTime_end", endPoint);
	}
}